Budgets and Alerts
This lesson covers setting up budgets and alerts at project and billing account level.
We'll cover the following
We have $300 in free credits. We want to make sure that we use those and not get billed for extra charges. How can we do this? Well, budgets and alerts are here to help. Setting up our budget of $300 and setting up alerts for 50%, 90% and 100% of actual spending can save us from getting charged extra on our credit cards.
So, let’s do it.
We can set budgets for each billing account.
Please note that credits are provided to the first billing account only. Projects linked to the second and subsequent billing accounts may charge you. So, to avoid this, attach all projects to the first billing account only and remove the existing ones from other billing accounts that don’t have credits. To check the available credits for your billing account, follow these steps:
- Go to the Main menu > Billing.
- Select the primary billing account (first billing account).
You will see the available credits at the bottom corner. The currency is based on the country you choose.
Setting up budgets and alerts#
We need to set up budgets and alerts specific to billing accounts, and we need to set them up on each of the billing accounts separately. As we are not using the second billing account and fee credits are applied to the first, we will set up a budget in the first billing account.
Steps to create a budget#
-
Open budgets and alerts. Main menu > Billing > Budgets & alerts
-
Click on “Create budget.”
-
Name the budget.
-
Select all the projects in the dropdown.
-
For credits, uncheck the promotional. We are not including the promotional credits in the budget because the selected credits are applied to the total cost and a budget tracks the total cost minus any applicable selected credits. So, if we include promotional credits, the budget will start tracking once we exhaust the free credits. In the next window, we need to select the budget type. We can set it to the last month’s spend or specify a new amount. Since we want to track our $300 credit, we will specify the amount.
-
Select “Specified amount” and enter $300 or the equivalent amount in your currency.
-
In the next window, we have alerts configurations. Alerts will be triggered when the specified percentage of the budget is spent or forecasted. We will select the “actual spent” option.
-
We don’t have notification channels configured so leave it unchecked.
-
We don’t need PubSub right now so leave it unchecked. When checked, a JSON payload of the alert is sent to the topic so that other services can use it.
-
Click ”Finish.”
Now, for the specified alerts, you will receive an email on your registered email ID. Once you get the email for 90% spent, you can stop all the billable services and delete the project if it is unnecessary.
In production, if spending exceeds the budget, nothing will happen to the resources and no resource is stopped. Budgets and alerts are just precautionary, and no action is taken by GCP based on it.
1 of 7
2 of 7
3 of 7
4 of 7
5 of 7
6 of 7
7 of 7
Since we have the budget and alert set up for our free credits account, you can keep exploring until the email arrives in your inbox (the email you used to create this GCP account).
Google Cloud also provides export functionality of all the billing data. This exported data can be used for analysis to reveal spending patterns and extra costs.
Linking Projects to a Billing Account
Setting up Billing Exports: BigQuery